package top.jiangqiang.qianyi.common.constants.http;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import top.jiangqiang.qianyi.common.base.http.ErrorStatus;

/**
 * @Date 2023/10/19 17:28
 * @Author Jiangqiang
 */
@Getter
@Slf4j
@AllArgsConstructor
public enum Error403Status implements ErrorStatus {

    //403 身份认证成功但是没有权限
    FORBIDDEN(100, "没有权限"),

    ;

    private final HttpStatus httpStatusCode = HttpStatus.FORBIDDEN;
    //业务状态码
    private final int code;
    private final String message;

    @Override
    public int getRawStatusCode() {
        return 403;
    }

    @Override
    public HttpStatus getHttpStatus() {
        return HttpStatus.FORBIDDEN;
    }
}
